#ifndef _DRV_H
#define _DRV_H

#include "core/dev_cfg.h"
#include "core/dev.h"

#ifdef __cplusplus
extern "C"{
#endif


typedef struct driver{
    const char *name;
    const int type;
    const char *compat;
    void *private_data;
    const void *private_ops; // private ops
    void *bus;
    const void *ops; //device ops
    int (*probe)(void *dev, void *drv);
    int (*remove)(void *dev, void *drv);
    struct driver *next;
}driver_t;

EXTERN DEVICE_PUBLIC(int) driver_register(driver_t *drv, void *bus);
EXTERN DEVICE_PUBLIC(int) driver_unregister(driver_t *drv);

#ifdef __cplusplus
}
#endif

#endif
